<?php /*a:2:{s:72:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\vrgroupbuy\class_form.html";i:1567062757;s:64:"D:\phpstudy_pro\WWW\git\DSShop\app\admin\view\public\header.html";i:1571626691;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>DSShop单店铺商城系统后台</title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
        <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
        <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/dialog/dialog.js" id="dialog_js" charset="utf-8"></script>

        <script type="text/javascript">
            var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
            var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
            var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
            var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
            var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
        </script>
    </head>
    <body>
        <div id="append_parent"></div>
        <div id="ajaxwaitid"></div>








<div class="page">


    <form id="add_form" method="post" enctype="multipart/form-data">
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                    <td colspan="2" class="required"><label class="validation" for="vrgclass_name">分类名称<?php echo htmlentities(lang('ds_colon')); ?></label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform">
                        <input type="text" name="vrgclass_name" id="vrgclass_name" class="txt" value="<?php echo htmlentities((isset($class['vrgclass_name']) && ($class['vrgclass_name'] !== '')?$class['vrgclass_name']:'')); ?>">
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <?php if(empty($class) || (($class instanceof \think\Collection || $class instanceof \think\Paginator ) && $class->isEmpty())): ?>
                <tr>
                    <td colspan="2" class="required"><label for="vrgclass_parent_id">上级分类<?php echo htmlentities(lang('ds_colon')); ?></label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><select id="vrgclass_parent_id" name="vrgclass_parent_id" class="valid" >
                            <option value="0"><?php echo htmlentities(lang('ds_please_choose')); ?>...</option>
                            <?php if(!(empty($vrgroupbuyclass_list) || (($vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator ) && $vrgroupbuyclass_list->isEmpty()))): if(is_array($vrgroupbuyclass_list) || $vrgroupbuyclass_list instanceof \think\Collection || $vrgroupbuyclass_list instanceof \think\Paginator): if( count($vrgroupbuyclass_list)==0 ) : echo "" ;else: foreach($vrgroupbuyclass_list as $key=>$val): ?>
                            <option value="<?php echo htmlentities($val['vrgclass_id']); ?>" <?php if($vrgclass_parent_id == $val['vrgclass_id']): ?>selected<?php endif; ?>><?php echo htmlentities($val['vrgclass_name']); ?></option>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                            <?php endif; ?>
                        </select>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <?php endif; ?>
                <tr>
                    <td colspan="2" class="required"><label for="vrgclass_sort" class="validation"><?php echo htmlentities(lang('ds_sort')); ?><?php echo htmlentities(lang('ds_colon')); ?></label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input id="vrgclass_sort" name="vrgclass_sort" type="text" class="txt" value="<?php echo htmlentities((isset($class['vrgclass_sort']) && ($class['vrgclass_sort'] !== '')?$class['vrgclass_sort']:'')); ?>" /></td>
                    <td class="vatop tips"><?php echo htmlentities(lang('class_sort_explain')); ?></td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="2">
                        <input class="btn" type="submit" value="<?php echo htmlentities(lang('ds_submit')); ?>"/>
                    </td>
                </tr>
            </tfoot>
        </table>
    </form>

</div>

<script type="text/javascript">
    $(function(){
        $('#add_form').validate({
            errorPlacement: function(error, element){
                error.appendTo(element.parent().parent().prev().find('td:first'));
            },
            rules : {
                vrgclass_name: {
                    required : true,
                    maxlength : 10
                },
                vrgclass_sort: {
                    required : true,
                    max: 255,
                    min: 0
                }
            },
            messages : {
                vrgclass_name: {
                    required : "分类名称不能为空",
                    maxlength : "分类名称长度最多10个字符"
                },
                vrgclass_sort: {
                    required : "排序不能为空",
                    max : "排序必须是数字,且数值0-255",
                    min : "排序必须是数字,且数值0-255"
                }
            }
        });
    });
</script>